<?
include('seguridad.php');
include('bd.php');
Conectar();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> BideYoday </TITLE>
  <META NAME="Generator" CONTENT="DILAPER">
  <META NAME="Author" CONTENT="Power by Sebastian Costa - Design: Nadia De Cinti">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">
  <link href="../style.css" rel="stylesheet" type="text/css">
  <script src="../js/botonera.js" type="text/javascript"></script>
    <script language="JavaScript" type="text/JavaScript">

function validar_coment(form)
{
	if(form.name.value == '') {
		alert("Please insert Name");
		form.name.focus();
		return false;
	}
	if(form.principal.value == '') {
		alert("Please insert the principal Image");
		form.principal.focus();
		return false;
	}
	if(form.price_d.value == '') {
		alert("Please insert price");
		form.price_d.focus();
		return false;
	}
		
	document.getElementById('product_new').submit();
}
</script>
 </HEAD>

 <BODY topmargin="0">
<center>
<table width="990" height="100%" cellspacing="0" cellpadding="0" class="fondo" border="0">
	<tr>
		<td width="100%" height="100%" align="center" valign="top">
			<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
				<tr>
					<td align="center" valign="top">
<div style="height: 135px"></div>
<!-- contenido -->
<table width="800"  border="0" class="admin_area" cellspacing="0" cellpadding="0">
	<tr bgcolor="#ffffff">
		<td align="right" height="30">
Welcome <?echo $_SESSION['usuario'];?>&nbsp;|&nbsp;<a href="salir.php"><font color="red">Log Out</font></a>&nbsp;&nbsp;
		</td>
	</tr>	
	<tr><td height="3"></td></tr>
	<tr bgcolor="#ffffff">
		<td align="right" height="50">
<?include('menu.php');?>
		</td>
	</tr>	
	<tr><td height="3"></td></tr>
	<tr bgcolor="#ffffff">
		<td align="left" valign="top" height="300"  class="tabla_central">
<div style="margin: 10px">
<b><span class="titulo_admin">Products</span></b><br>
<br>
To load new product<br>
<br>
<form name="product_new" id="product_new" method="POST" action="acciones/products_save.php" enctype="multipart/form-data">
<table width="100%" border="0" class="tabla_admin">
	<tr>
		<td align="right" bgcolor="#ffffff">
<b>Name&nbsp;&nbsp;</b>
		</td>
		<td>
<input type="text" name="name">
		</td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff">
<b>Modle&nbsp;&nbsp;</b>
		</td>
		<td>
<input type="text" name="modle">
		</td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff">
<b>Principal image&nbsp;&nbsp;</b>
		</td>
		<td>
<input type="file" name="principal">
		</td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff">
<b>Type Products&nbsp;&nbsp;</b>
		</td>
		<td>
Principal&nbsp;<input type="radio" name="type" value="principal" checked>&nbsp;&nbsp;Accessory&nbsp;<input type="radio" name="type" value="accessory">
		</td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff">
<b>Shape&nbsp;&nbsp;</b>
		</td>
		<td>
<select name="shape">
<?
$result=mysql_query("SELECT * FROM shape ORDER BY shape");
while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
?><option value="<?echo$row[shape];?>"><?echo$row[shape];?></option><?	
}?>
</select>
		</td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff">
<b>Color&nbsp;&nbsp;</b>
		</td>
		<td>
<select name="color">
<?
$result=mysql_query("SELECT * FROM color ORDER BY color DESC");
while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
?><option value="<?echo$row[color];?>"><?echo$row[color];?></option><?	
}?>
</select>
		</td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff">
<b>Price&nbsp;&nbsp;</b>
		</td>
		<td>
$<input type="text" name="price_d" size="2">,<input type="text" name="price_c" value="00" size="2">
		</td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff" valign="top">
<br>
<b>Overview&nbsp;&nbsp;</b>
		</td>
		<td>
<br>
&nbsp;&nbsp;Text<br>
<textarea name="overview" rows="10" cols="50"></textarea><br>
<br>
&nbsp;&nbsp;Image&nbsp;&nbsp;<input type="file" name="img_overview"><br>
<br>
		</td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff" valign="top">
<br>
<b>Details&nbsp;&nbsp;</b>
		</td>
		<td>
<br>
&nbsp;&nbsp;Text<br>
<textarea name="details" rows="10" cols="50"></textarea><br>
<br>
&nbsp;&nbsp;Image&nbsp;&nbsp;<input type="file" name="img_details"><br>
<br>
		</td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff" valign="top">
<br>
<b>Installations&nbsp;&nbsp;</b>
		</td>
		<td>
<br>
&nbsp;&nbsp;Text<br>
<textarea name="installation" rows="10" cols="50"></textarea><br>
<br>
&nbsp;&nbsp;Image&nbsp;&nbsp;<input type="file" name="img_installation"><br>
<br>
		</td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff" valign="top">
<br>
<b>Warranty&nbsp;&nbsp;</b>
		</td>
		<td>
<br>
&nbsp;&nbsp;Text<br>
<textarea name="warranty" rows="10" cols="50"></textarea><br>
<br>
&nbsp;&nbsp;Image&nbsp;&nbsp;<input type="file" name="img_warranty"><br>
<br>
		</td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff">
<b>URL Video&nbsp;&nbsp;</b>
		</td>
		<td>
<input type="text" name="video">
		</td>
	</tr>
	<tr>
		<td colspan="2" bgcolor="#ffffff" align="center">
<input type="button" value="Save Step 1" onClick="javascript:validar_coment(document.getElementById('product_new'));">
		</td>
	</tr>
</table>
</form>
</div>
<br>
		</td>
	</tr>
</table>
<table width="800" border="0" class="admin_area" cellspacing="0" cellpadding="0">
	<tr>
		<td height="3">

		</td>
	</tr>
	<tr bgcolor="#ffffff">
		<td align="right">
<?include('inc/foot.php');?>
		</td>
	</tr>
</table>
<!-- fin contenido -->
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
</center>
 </BODY>
</HTML>
<?Desconectar();?>